﻿<Window x:Class="XPSReaderWPF.Reader"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:controls="clr-namespace:WPFMitsuControls;assembly=WPFMitsuControls"
    Title="" x:Name="WindowBook" MinHeight="700" MinWidth="930" Height="Auto" Width="Auto" WindowStyle="SingleBorderWindow" SizeChanged="Window_SizeChanged" Loaded="Window_Loaded" Closed="Window_Closed" Background="Lavender" ResizeMode="CanResize" WindowState="Maximized" Icon="/XPSReader;component/livre_02.gif" SizeToContent="Manual" WindowStartupLocation="CenterScreen">
    <Grid x:Name="GridBook" ShowGridLines="False">
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="40" />
            <ColumnDefinition Width="*" />
            <ColumnDefinition Width="40" />
        </Grid.ColumnDefinitions>

        <Grid.RowDefinitions>
            <RowDefinition Height="40" />
            <RowDefinition Height="*" />
            <RowDefinition Height="40" />
        </Grid.RowDefinitions>

        <Grid.LayoutTransform>
            <RotateTransform  />
        </Grid.LayoutTransform>
        <Image x:Name="livreOuvert" Grid.Column="1" Grid.Row="1" Source="/XPSReader;component/livre vierge.png">
            <Image.LayoutTransform>
                <RotateTransform  />
            </Image.LayoutTransform>
        </Image>
        <DockPanel Name="dockPanel1" Height="Auto" Width="Auto" Margin="50,15,50,15" Grid.Column="1" Grid.Row="1" LastChildFill="True" >
            <DockPanel.LayoutTransform>
                <RotateTransform/>
            </DockPanel.LayoutTransform>
            <DockPanel.Children>
                <controls:Book Name="myBook" Width="Auto" Height="Auto" MouseDoubleClick="myBook_MouseDoubleClick">
                    <controls:Book.ItemTemplate>
                        <DataTemplate>
                            <Border BorderThickness="1" BorderBrush="Gray" Background="Transparent">
                                <ContentControl Content="{Binding .}" />
                            </Border>
                        </DataTemplate>
                    </controls:Book.ItemTemplate>
                    <controls:Book.LayoutTransform>
                        <ScaleTransform />
                    </controls:Book.LayoutTransform>
                </controls:Book>
            </DockPanel.Children>
        </DockPanel>
        <Button HorizontalAlignment="Left" Grid.Column="0" Grid.Row="0" Grid.RowSpan="3" Margin="0,206,0,208" Name="buttonPrevious" Click="buttonPrevious_Click" Width="35" Height="46" ToolTip="Previous">
            <Button.BitmapEffect>
                <DropShadowBitmapEffect />
            </Button.BitmapEffect> &lt;
        </Button>
        <Button HorizontalAlignment="Right" Grid.Column="2" Grid.Row="0" Grid.RowSpan="3"  Margin="0,206,0,208" Name="buttonNext" Click="buttonNext_Click" Width="35" Height="46" Visibility="Visible" ToolTip="Next">
            <Button.BitmapEffect>
                <DropShadowBitmapEffect />
            </Button.BitmapEffect> &gt;
        </Button>
    </Grid>
</Window>